// 用户信息留言
class LeaveWord {
    String personname = '' // 留言人
    String contact = '' //联系方式
    String content = '' //内容
    Student student
    Teacher teacher
    Date createTime = new Date()

    static constraints = {
        personname(size: 1..50,blank: false)
        contact(size: 1..200,blank: false,nullable: true)
        content(size: 1..500,blank: false)
        student(nullable: true)
        teacher(nullable: true)
    }

    static mapping = {
       table 'jiajiao_leaveWord'
    }

    String toString() {
        "${personname}"
    }
}
